@extends('admin')
@section('content')
    <p class="mb10">
        <a href="{{url('admin/user/newm')}}" class="btn J_dialog" title="添加门店"><span class="add"></span>添加门店</a>
    </p>
    <div class="h_a">搜索</div>
    <div class="search_type cc mb10">
        <form action="{{url('admin/user/merchant')}}" method="get" class="search_form">
            <label for="search_title">门店名称：</label>
            <input type="text" name="name" value="{{isset($appends['name']) ? $appends['name'] : ""}}" id="search_title" class="input length_2 mr10"/>
            <button type="submit" class="btn">查找用户</button>
        </form>
    </div>

    <div class="table_list">
        <div id="data_list">
            <table class="items">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>门店账号</th>
                    <th>门店昵称</th>
                    <th>门店真实姓名</th>
                    <th>联系电话</th>
                    <th>邮箱</th>
                    <th>门店状态</th>
                    <th>发布时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                @foreach ($list as $item)
                    <tr>
                        <td>{{$item->id}}</td>
                        <td>{{$item->name }}</td>
                        <td>{{$item->nick }}</td>
                        <td>{{$item->real_name }}</td>
                        <td>{{$item->mobile}}</td>
                        <td>{{$item->email}}</td>
                        <td>{{1 == $item->status ? "启用" : "禁用"}}</td>
                        <td>{{$item->created_at}}</td>
                        <td>
                            <a href="{{url('admin/user/newm/'.$item->id)}}" title="编辑 {{$item->name}}"
                               class="mr10 J_dialog">[编辑]</a>
                            <a href="{{url('admin/user/delm/'.$item->id)}}" class="mr10 J_ajax_del">[删除]</a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>

        <div class="summary">
            共有 {{$list->total()}} 条数据
        </div>
        @if ($list->hasPages())
            <div class="pager">
                {!! $list->appends($appends)->render() !!}
            </div>
        @endif
    </div>
@stop